using OracleInternal.Common;

namespace OracleInternal.TTC
{
	internal class NotificationMessageProperties
	{
		private MarshallingEngine m_mEngine;

		private AQMessage m_aqm;

		internal NotificationMessageProperties(MarshallingEngine mEngine)
		{
			m_mEngine = mEngine;
			m_aqm = new AQMessage(m_mEngine);
		}

		internal void Receive()
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)131328, OracleTraceClassName.NotificationMessageProperties, OracleTraceFuncName.Receive);
			}
			try
			{
				int num = (int)m_mEngine.UnmarshalUB4();
				if (num > 0)
				{
					byte[] array = new byte[num];
					int[] array2 = new int[1];
					m_mEngine.UnmarshalCLR(array, 0, array2, array.Length);
					num = array2[0];
				}
				int num2 = (int)m_mEngine.UnmarshalUB4();
				if (num2 > 0)
				{
					m_mEngine.UnmarshalUB1();
					m_aqm.Receive();
				}
				int num3 = (int)m_mEngine.UnmarshalUB4();
				_ = 0;
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					string text = "messageIdLength=" + num + ", aqMessagePropertiesLength=" + num2 + ", jmsMessagePropertiesLength=" + num3;
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.TTC, OracleTraceClassName.NotificationMessageProperties, OracleTraceFuncName.Receive, text);
				}
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)131584, OracleTraceClassName.NotificationMessageProperties, OracleTraceFuncName.Receive);
				}
			}
		}
	}
}
